/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package helloworld;

import TRIRzadeve.PomozniRazred;
import TRIRzadeve.Vreme;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.*;


@Path("/TRIR")
public class TRIRPodatk {

    
    @GET
    @Path("/vrniPodatkeZaMesto/{mesto}")
    @Produces("application/json")
    public ArrayList<Vreme> getVnesenoMesto(@PathParam("mesto") String mesto) {
        ArrayList<Vreme> temp = null;
        try {
            temp = PomozniRazred.vrniPodatkeMesta(mesto);
        } catch (Exception ex) {
            Logger.getLogger(TRIRPodatk.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
        return temp;
    }
    
    @GET
    @Path("/vrniZadnjePodatkeZaVsaMesta")
    @Produces("application/json")
    public ArrayList<Vreme> getZadnjePodatke() {
        ArrayList<Vreme> temp = null;
        try {
            temp = PomozniRazred.vrniPodatkeZaVsaMesta();
        } catch (Exception ex) {
            Logger.getLogger(TRIRPodatk.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
        return temp;
    }
}
